package com.cognitran.cssvalidator.ant.output.formatters;

import java.io.File;

import com.cognitran.cssvalidator.validation.model.CSSValidationResults;

/**
 * The interface for writing formatted output for a css validation.
 * 
 * @author garethf
 */
public interface OutputFormatter 
{

	/**
	 * Allow formatters to open any resources in use. Called before starting output.
	 */
	void init();

	
	/**
	 * Set the output location to write output from.
	 * 
	 * @param dir The output location.
	 */
	void setOutputLocation(final String dir);


	/**
	 * Write the formatted output to the target.
	 * 
	 * @param source The source file that was validated against.
	 * @param results The validation results.
	 */
	void writeFormattedOutput(final File source, final CSSValidationResults results);
	
	
	/**
	 * Allow formatters to close any resources in use. Called on completion of output.
	 */
	void cleanup();
	
}
